import 'package:flutter/material.dart';
import 'package:tihai/entity/base.dart';
import 'package:tihai/page/home/problem_page.dart';

class ProblemBean extends BaseBean{

  late int id;

  late int typeId;

  late int userId;

  late String title;

  late String choiceA;

  late String choiceB;

  late String choiceC;

  late String choiceD;

  late String answer;

  late int score;

  late String detail;

  @override
  ProblemBean fromJson(Map<String, dynamic> data) {
    ProblemBean problemBean = ProblemBean();
    problemBean.id = data["id"];
    problemBean.typeId = data["typeId"];
    problemBean.userId = data["userId"];
    problemBean.score = data["score"];
    problemBean.title = data["title"];
    problemBean.choiceA = data["choiceA"];
    problemBean.choiceB = data["choiceB"];
    problemBean.choiceC = data["choiceC"];
    problemBean.choiceD = data["choiceD"];
    problemBean.answer = data["answer"];
    problemBean.detail = data["detail"];
    return problemBean;
  }


}